﻿
@{
    ViewBag.Title = "ParkPageList";
    Layout = "~/Views/Shared/_LayoutMain.cshtml";
}

@section css {

}
<div ng-cloak ng-controller="SafetyConfigController" ng-init="
         page='@(Request.QueryString["page"].IsEmpty() ? "1" : Request.QueryString["page"])';
         SearchModel={};
         GetPlacePageList(SearchModel,page);">
    <div class="load" ng-show="PageLoading">
        <div class="loader" ng-show="PageLoading">
            <svg version="1.1" id="loader-1" x="0px" y="0px" width="100px" height="100px" viewBox="0 0 50 50" style="enable-background:new 0 0 50 50;" xml:space="preserve">
            <path fill="#000" d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z">
            <animateTransform attributeType="xml" attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="0.6s" repeatCount="indefinite" />



			</path>
		</svg>
            <div class="load-msg">正在加载...</div>
        </div>
    </div>
    <div class="row pt-2 pb-2">
        <div class="col-sm-9">
            <h4 class="page-title">场所列表</h4>
            <ol class="breadcrumb">
                <li class="breadcrumb-item"><a href="javaScript:void();">系统设置</a></li>
                <li class="breadcrumb-item"><a href="javaScript:void();">场所管理</a></li>
                <li class="breadcrumb-item active" aria-current="page">场所列表</li>
            </ol>
        </div>
        <div class="col-sm-3">

        </div>
    </div>
    <div class="row">
        <div class="col-12 col-lg-12 col-xl-12">
            <div class="card">
                <div class="card-header border-1">
                    筛选
                </div>
                <div class="card-body">
                    <form>
                        <div class="form-group row">
                            <div class="col-sm-2">
                                <input type="text" class="form-control" id="input-21" ng-model="SearchModel.PlaceName" placeholder="场所名称" ng-change="GetParkPageList(SearchModel,page);">
                            </div>
                            <div class="col-sm-2">
                                <select class="form-control">
                                    <option selected>所有园区</option>
                                </select>
                            </div>
                            <div class="col-sm-2">
                                <select class="form-control">
                                    <option selected>所有场所类型</option>
                                </select>
                            </div>
                        </div>
                    </form>
                </div>

            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-12 col-lg-12 col-xl-12">
            <div class="card">
                <div class="card-header border-1">
                    数据列表  数量：{{TotalCount}}
                    <div class="card-action">
                        <div class="dropdown">
                            <a href="javascript:void();" class="dropdown-toggle dropdown-toggle-nocaret" data-toggle="dropdown" aria-expanded="false">
                                <i class="icon-options"></i>
                            </a>
                            <div class="dropdown-menu dropdown-menu-right" x-placement="bottom-end" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(14px, 19px, 0px);">
                                <a class="dropdown-item" href="javascript:void();">添加数据</a>
                                <a class="dropdown-item" href="javascript:void();">导出数据</a>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="card-body">
                    <div class="table-responsive">
                        <table class="table align-items-center table-flush">
                            <thead>
                                <tr>
                                    <th>序号</th>
                                    <th>场所编号</th>
                                    <th>场所名</th>
                                    <th>位置</th>
                                    <th>场所类型</th>
                                    <th>状态</th>
                                    <th>备注</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr ng-show="PlacePageList.length==0 && !PageLoading">
                                    <td colspan="12" style="text-align:center;vertical-align:middle;line-height:30px;">没有数据</td>
                                </tr>
                                <tr ng-repeat="x in PlacePageList">
                                    <td>
                                        <span class="badge badge-primary m-1" ng-bind="$index+1"></span>
                                    </td>
                                    <td> <h6 class="mb-0">{{x.PlaceNo}}</h6></td>

                                    <td> <h6 class="mb-0">{{x.PlaceName}}</h6></td>

                                    <td>{{x.ParkInfo.ParkName}}{{x.Building.BuildingName}}{{x.Location}}</td>
                                    <td>
                                        <h6 class="mb-0">{{x.PlaceTypeName}}</h6>
                                    </td>

                                    <td><span class="badge badge-success m-1">{{x.Valid | GetBoolStr}}</span></td>
                                    <td></td>
                                    <td>
                                        <a href="javascript:void()" class="btn btn-outline-warning m-1"><i class="fa fa-pencil"></i></a>
                                        <a href="javascript:void()" class="btn btn-outline-danger m-1"><i class="fa fa-trash"></i></a>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>

                <div class="card-footer">
                    <div class="text-center" ng-show="PlacePageList!=null && PlacePageList.length>0">
                        <ul class="pagination justify-content-center">
                            <li class="page-item"><a class="page-link" style="cursor:pointer;" ng-click="GetPlacePageList(SearchModel,1);">首页</a></li>
                            <li class="page-item" ng-class="{'active':result.currentPage==page}" ng-repeat="page in result.pages"><a style="cursor:pointer;" ng-click="GetPlacePageList(SearchModel,page)" class="page-link" ng-bind="page"></a></li>
                            <li class="page-item"><a class="page-link" style="cursor:pointer;" ng-click="GetPlacePageList(SearchModel,(result.currentPage + 1 > result.totalPage ? result.totalPage : result.currentPage + 1))">下一页</a></li>
                            <li class="page-item"><a class="page-link" style="cursor:pointer;" ng-click="GetPlacePageList(SearchModel,result.totalPage);">尾页</a></li>
                        </ul>
                    </div>
                </div>

            </div>
        </div>
    </div>
</div>


@section Js{
    <script src="~/Assets/js/pg/SafetyConfig.js"></script>
}
